package request

import (
	"log"
	"net/http"
)

func SendGetRequest(courseURL string) *http.Response {
	// 创建 GET 请求
	resp, err := http.Get(courseURL)
	if err != nil {
		log.Fatalf("Error sending GET request: %v", err)
	}

	// 检查响应状态码
	if resp.StatusCode != http.StatusOK {
		log.Fatalf("Error: status code %d", resp.StatusCode)
	}
	return resp
}
